<?
require_once("geoip.inc");
$gi = geoip_open("geoip.dat",GEOIP_STANDARD);
$code = geoip_country_code_by_addr($gi, $_SERVER["REMOTE_ADDR"]);
$name = geoip_country_name_by_addr($gi, $_SERVER["REMOTE_ADDR"]);
geoip_close($gi);

echo $code." - ".$name;
?>